export function unique(arr){
  const result = []
  arr.forEach(item=>{
    if(result.indexOf(item) === -1){
      result.push(item)
    }
  })
  return result
}

export function unique2(arr){
  const result = []
  const obj = {}
  arr.forEach(item=>{
    if(obj[item] === undefined){
      obj[item] = true
      result.push(item)
    }
  })
  return result
}

export function unique3(arr){
  return [...new Set(arr)]
}